DirectoryIndex index.php
Options -MultiViews

# Preserve Authorization headers for Symfony API Bearer authentication.
SetEnvIfNoCase Authorization "^(.*)$" HTTP_AUTHORIZATION=$1

<IfModule mod_rewrite.c>
    RewriteEngine On

    # Preserve Bearer Authorization for PHP/FastCGI on shared hosting.
    RewriteCond %{HTTP:Authorization} ^(.+)
    RewriteRule .* - [E=HTTP_AUTHORIZATION:%1]

    # Let Apache serve real files and directories directly. This keeps
    # /install/ available before Symfony itself is bootable.
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]

    # Everything else is handled by Symfony's front controller.
    RewriteRule ^ index.php [QSA,L]
</IfModule>

<IfModule !mod_rewrite.c>
    <IfModule mod_alias.c>
        RedirectMatch 307 ^/$ /index.php/
    </IfModule>
</IfModule>

# php -- BEGIN cPanel-generated handler, do not edit
# Set the “ea-php84” package as the default “PHP” programming language.
<IfModule mime_module>
  AddHandler application/x-httpd-ea-php84 .php .php8 .phtml
</IfModule>
# php -- END cPanel-generated handler, do not edit

